#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{

    ui->setupUi(this);
    setWindowTitle("miniRayTracer");
    resize(1920,1080);
    renderWidget=new RenderWidget(this);
    setCentralWidget(renderWidget);
    statusBar()->close();
//    QDockWidget*temp=new QDockWidget("123",this);
//    addDockWidget(Qt::RightDockWidgetArea,temp);

//    int cx, cy;
//    //当parent为空时，窗口就显示在桌面中央
//    if( NULL == parent )
//    {

//       cx = (screen()->availableSize().width() - width()) / 2;
//       cy = (screen()->availableSize().height() - height()) / 2;
//    }
//    //否则，控件就显示在父部件中央
//    else
//    {
//       cx = ( parent->width() - width() ) / 2;
//       cy = ( parent->height() - height() ) / 2;
//    }
//    move(cx, cy);
    qDebug()<<"i am here";
    showFullScreen();

}

MainWindow::~MainWindow()
{
    delete ui;
}

